package com.by.controller;

import com.by.config.DbConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @version 1.0
 * @Author 彭彦彬
 * @Date 2025/4/2 9:48
 * @注释
 */
@RestController
@RequestMapping("/api")
public class DBController {
    @Autowired
    DbConfig dbConfig;
    @GetMapping("/db")
    public Map test() {
        Map map=new HashMap();
        map.put("username",dbConfig.getUsername());
        map.put("password",dbConfig.getPassword());
        map.put("url",dbConfig.getUrl());
        return map;
    }
}
